package com.pulp.production.action;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;
import org.apache.struts2.ServletActionContext;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

import com.pulp.production.model.ProductionInfo;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;
import com.pulp.production.service.ProductionInfoService;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

public class LaminateAction<ProductionInfo> extends ActionSupport {
	
	private static final long serialVersionUID = 1L;
	private String REQUEST_RESULT = "ok";
	static Logger logger = Logger.getLogger(LaminateAction.class);
	
	private String errorCode="";
	
	private List myList = null;

	public List getMyList() {
		return myList;
	}

	public void setMyList(List myList) {
		this.myList = myList;
	}
	
	public String getErrorCode() {	
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	
	public LaminateAction() {
	}
	
	public String excute() throws Exception {
	
		
		try{
        	
			HttpServletRequest request	= (HttpServletRequest)ServletActionContext.getRequest();
        	
        	 ServletContext servletContext = ServletActionContext.getServletContext();
 			WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(servletContext);
 			ProductionInfoService productionInfoService = (ProductionInfoService) wac.getBean("productionInfoService");
// 			 myList = (List) orgnizationInfoService.getUserInfo();
 			
// 			List loginList = orgnizationInfoService.getUserInfo();
        	
        
			
		}  catch (Exception ex) {
        	REQUEST_RESULT = "FAILED";
            ex.printStackTrace();
        }
		return REQUEST_RESULT;
	}
	
}
